
#ifndef IPCOPS_H
#define IPCOPS_H

#include <mqueue.h>

// Just an arbitraty number that I picked.
#define MAX_MQ_MSG_IN_QUE  40

  int g_arFileDescriptor[2];

  int PipeCreate(int arFileDescriptor[2]);
  int PipeReceive(int nPipeHandle, void *pBuffer, int nLength);
  int PipeSend(int nPipeHandle, void *pBuffer, int nLength);

  mqd_t CreateMqMessage(const char *szQueueName, int nMsgTextMaxSize, int nMaxMsgsInQueue);
  int DestroyMqMessage(const char *szQueueName);
  mqd_t OpenMqMessage(const char *szQueueName);
  int ReceiveMqMessage(mqd_t nQueId, char *szMessage, int nMaxLength, int nRecoverOnIntr);
  int SendMqMessage(int nMsgId, char *szMessage, int nMsgLength);

#endif
